package com.hcb.micro.util;

public enum BankEnum {
	BANK_1((byte)1,"ICBKCNBJ","工商银行"),
	BANK_17((byte)17,"ICBKCNBJ","中国工商银行"),
	BANK_2((byte)2,"ABOCCNBJ","农业银行"),
	BANK_3((byte)3,"BKCHCNBJ","中国银行"),
	BANK_4((byte)4,"PCBCCNBJ","建设银行"),
	BANK_5((byte)5,"COMMCNSH","交通银行"),
	BANK_6((byte)6,"PSBCCNBJ","邮储银行"),
	BANK_7((byte)7,"CMBCCNBS","招商银行"),
	BANK_8((byte)8,"SZDBCNBS","平安银行"),
	BANK_9((byte)9,"GDBKCN22","广发银行"),
	BANK_10((byte)10,"EVERCNBJ","光大银行"),
	BANK_11((byte)11,"MSBCCNBJ","民生银行"),
	BANK_12((byte)12,"FJIBCNBA","兴业银行"),
	BANK_13((byte)13,"CIBKCNBJ","中信银行"),
	BANK_14((byte)14,"HFBACNSD","恒丰银行"),
	BANK_15((byte)15,"ZJCBCN2N","浙商银行"),
	BANK_16((byte)16,"HZCBCN2H","杭州银行");
    
    final byte sign;
    
    final String code;
    
    final String name;
    
    private BankEnum(byte sign,String code, String name)
    {
        this.sign = sign;
        this.code = code;
        this.name = name;
    }
    
    public byte getSign()
    {
        return sign;
    }
    
    public String getCode()
    {
        return code;
    }
    
    public String getName()
    {
        return name;
    }
    
    public static String getNameBySign(byte sign)
    {
        for (BankEnum e : BankEnum.values())
        {
            if (sign == e.sign)
            {
                return e.name;
            }
        }
        return "";
    }
    
    public static String getNameByCode(String code)
    {
        for (BankEnum e : BankEnum.values())
        {
            if (code == e.code)
            {
                return e.name;
            }
        }
        return "";
    }
}
